package com.winit.schedule.core.repository.entity;

import java.io.Serializable;
import java.util.Set;

import com.winit.schedule.core.model.TaskID;
import com.winit.schedule.core.repository.constants.TaskRunnerStatus;

public class TaskRunnerEntity implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -7955288662154132518L;

    private String            taskRunnerUuid;

    private String            taskTrackerUuid;

    private TaskID            taskId;

    private Set<String>       taskItemIds;

    private long              registerTime;

    private long              lastFetchDataTime;

    private long              fetchDataNum;                            // 读取的数据量

    private long              fetchDataCount;                          // 读取次数

    private long              dealDataSucess;                          // 处理成功的数据量

    private long              dealDataFail;                            // 处理失败的数据量

    private long              dealSpendTime;                           // 处理总耗时,没有做同步，可能存在一定的误差

    private int               threadNum;

    private TaskRunnerStatus  status;

    public TaskRunnerEntity(){
    }

    public TaskRunnerEntity(String taskTrackerUuid, String taskRunnerUuid, TaskID taskId, TaskRunnerStatus status){
        super();
        this.taskTrackerUuid = taskTrackerUuid;
        this.taskRunnerUuid = taskRunnerUuid;
        this.taskId = taskId;
        this.status = status;
    }

    public TaskRunnerEntity(String taskRunnerUuid){
        super();
        this.taskRunnerUuid = taskRunnerUuid;
    }

    public String getTaskTrackerUuid() {
        return taskTrackerUuid;
    }

    public void setTaskTrackerUuid(String taskTrackerUuid) {
        this.taskTrackerUuid = taskTrackerUuid;
    }

    public long getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(long registerTime) {
        this.registerTime = registerTime;
    }

    public long getLastFetchDataTime() {
        return lastFetchDataTime;
    }

    public void setLastFetchDataTime(long lastFetchDataTime) {
        this.lastFetchDataTime = lastFetchDataTime;
    }

    public String getTaskRunnerUuid() {
        return taskRunnerUuid;
    }

    public void setTaskRunnerUuid(String taskRunnerUuid) {
        this.taskRunnerUuid = taskRunnerUuid;
    }

    public int getThreadNum() {
        return threadNum;
    }

    public void setThreadNum(int threadNum) {
        this.threadNum = threadNum;
    }

    public TaskRunnerStatus getStatus() {
        return status;
    }

    public void setStatus(TaskRunnerStatus status) {
        this.status = status;
    }

    public TaskID getTaskId() {
        return taskId;
    }

    public void setTaskId(TaskID taskId) {
        this.taskId = taskId;
    }

    public Set<String> getTaskItemIds() {
        return taskItemIds;
    }

    public void setTaskItemIds(Set<String> taskItemIds) {
        this.taskItemIds = taskItemIds;
    }

    public long getFetchDataNum() {
        return fetchDataNum;
    }

    public void setFetchDataNum(long fetchDataNum) {
        this.fetchDataNum = fetchDataNum;
    }

    public long getFetchDataCount() {
        return fetchDataCount;
    }

    public void setFetchDataCount(long fetchDataCount) {
        this.fetchDataCount = fetchDataCount;
    }

    public long getDealDataSucess() {
        return dealDataSucess;
    }

    public void setDealDataSucess(long dealDataSucess) {
        this.dealDataSucess = dealDataSucess;
    }

    public long getDealDataFail() {
        return dealDataFail;
    }

    public void setDealDataFail(long dealDataFail) {
        this.dealDataFail = dealDataFail;
    }

    public long getDealSpendTime() {
        return dealSpendTime;
    }

    public void setDealSpendTime(long dealSpendTime) {
        this.dealSpendTime = dealSpendTime;
    }

}
